//package cn.hesion.designpattern.delegate.mvc;
//
//import cn.hesion.designpattern.delegate.mvc.controller.MemberController;
//import sun.net.www.protocol.http.Handler;
//
//import javax.servlet.ServletException;
//import javax.servlet.http.HttpServlet;
//import java.util.ArrayList;
//import java.util.List;
//
//
//public class DispatcherServlet extends HttpServlet {
//   //传统的方案
//   //   private void doDispatch(HttpServletRequest req, HttpServletResponse resp)
////           throws Exception{
////      //返回请求行中的资源名部分。
////      String uri = req.getRequestURI();
////      String mid = req.getParameter("mid");
////
////      if("getMemberId".equals(uri)){
////         new MemberController().getMemberById(mid);
////      }else if("getOrderById".equals(mid)){
////         new OrderController().getOrderById(mid);
////      }else if("logout".equals(mid)){
////         new SystemController().logout();
////      }else {
////         resp.getWriter().write("404 Not Find");
////      }
////   }
////
////   protected void service(HttpServletRequest req,HttpServletResponse resp)
////      throws ServletException, IOException{
////      try {
////         doDispatch(req,resp);
////      } catch (Exception e) {
////         e.printStackTrace();
////      }
////   }
//   //接下来我们采用委派模式
//   List<Handler> handlerMapping = new ArrayList<Handler>();
//   //往HandlerMapper
//   public void init() throws ServletException{
//      Class<MemberController> memberControllerClass = MemberController.class;
////      handlerMapping.add()
//   }
//}
